var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(e, c, b) {
    if (status == 0 && e == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (cm.getMapId() == 867147400 && cm.isQuestFinished(64771) && cm.getNumberFromQuestInfo(64764, "talk") == 0) {
                cm.warp(867147015, 0, true);
                cm.updateInfoQuest(64764, "chk1=1;chk2=1;talk=1");
                return
            }
            if (cm.getMapId() == 867147700 && cm.isQuestFinished(64773) && cm.getQuestStatus(64774) == 0) {
                cm.warp(867147017, 0, true);
                return
            }
            if (cm.getMapId() == 867147800 && cm.isQuestFinished(64775) && cm.getQuestStatus(64776) == 0) {
                cm.warp(867147019, 0, true);
                return
            }
            if (cm.getMapId() == 867148000 && cm.isQuestFinished(64778) && cm.getQuestStatus(64779) == 0) {
                cm.warp(867147021, 0, true);
                return
            }
            if (cm.getMapId() == 867148300 && cm.isQuestFinished(64782) && cm.getQuestStatus(64783) == 0) {
                cm.warp(867147023, 0, true);
                return
            }
            if (cm.getMapId() == 867148300 && cm.isQuestActive(64784)) {
                cm.warp(867147025, 0, true);
                return
            }
            if (cm.getMapId() == 867148400 && cm.isQuestFinished(64784) && cm.getQuestStatus(64785) == 0) {
                cm.warp(867147027, 0, true);
                return
            }
            if (cm.getMapId() == 867148400 && cm.isQuestActive(64786)) {
                cm.warp(867147028, 0, true);
                return
            }
            cm.fakeInit();
            if (cm.getQuestStatus(64771) > 0) {
                cm.onActionBarResult(5, 1013)
            }
            var d = cm.getNumberFromQuestInfo(64754, "time");
            cm.setAbyssTime(d * 1000);
            cm.getPlayer().scheduleWarpTask(d, 867147001, 3, false);
            cm.dispose()
        }
    }
};